package cn.byapps.hw.dao;

import cn.byapps.hw.entity.Material;
import cn.byapps.hw.entity.StudentLogin;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface StudentLoginDao extends JpaRepository<StudentLogin, Integer> {
    /**
     * 根据material实体查询
     *
     * @param material
     * @return
     */
    @Query("select (u) from StudentLogin u where u.material = :material")
    List<StudentLogin> findByMaterial(Material material);
}
